import { createListOperationColumn } from '@longnows/ui'
export const useListOperation = (dpm, openBodyInfoModal) => {
  console.log('🚀 ~ useListOperation ~ dpm:', dpm)

  const map = new Map<string, any>([
    [
      'edit',
      ({ row }) => ({
        click: () => {
          openBodyInfoModal(row)
        },
      }),
    ],
    [
      'check',
      ({ row }) => ({
        click: () => {
          openBodyInfoModal(row)
        },
      }),
    ],
  ])
  const addOperationColumn = (actions) => {
    return createListOperationColumn(actions, map)
  }
  return {
    addOperationColumn,
  }
}
